package com.incar.chuxing.activity.driving;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.incar.chuxing.R;
import com.incar.chuxing.base.BaseActivity;
import com.incar.chuxing.utils.AppManager;
import com.incar.chuxing.widget.SearchPositionView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class SearchParkActivity extends BaseActivity implements SearchPositionView.FinishActivity {

    @BindView(R.id.search_park)
    SearchPositionView searchPark;
    @BindView(R.id.title_back)
    ImageView titleBack;
    @BindView(R.id.title_name)
    TextView titleName;
    @BindView(R.id.title_more)
    ImageView titleMore;
    @BindView(R.id.title_tv_more)
    TextView titleTvMore;
    @BindView(R.id.title_tv)
    TextView titleTv;
    @BindView(R.id.title_bar)
    RelativeLayout titleRl;

    @Override
    public int getLayoutId() {
        return R.layout.activity_search_park;
    }

    @Override
    public void initView() {
        searchPark.setFinishActivity(SearchParkActivity.this);
        searchPark.setSearchViewText(getIntent().getStringExtra("content") + "");
        searchPark.setintentFrom(getIntent().getIntExtra("intentFrom", 0));
        if (getIntent().getIntExtra("intentFrom", 0) == 1) {
            titleTv.setVisibility(View.VISIBLE);
            titleRl.setVisibility(View.VISIBLE);
        }
    }

    @Override
    public void finishActivity() {
        AppManager.getAppManager().finishActivity(this);
    }

    @OnClick({R.id.title_back, R.id.title_tv})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.title_back:
                AppManager.getAppManager().finishActivity();
                break;
            case R.id.title_tv:
                break;
        }
    }
}
